﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SH.Room.Application.IServices.IRoomState;
using SH.Room.Application.IServices.IStay;

namespace SH.Room.Read.API.Controllers
{
    /// <summary>
    /// 房型个数
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class StayController : ControllerBase
    {
        private readonly IStayServices _stayServices;

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="stayServices"></param>
        public StayController(IStayServices stayServices)
        {
            _stayServices = stayServices;
        }

        /// <summary>
        /// 统计房型个数
        /// </summary>
        /// <returns>受影响行数</returns>
        [HttpGet]
        public async Task<IActionResult> GetRoomCountList()
        {
           var reseult = await _stayServices.GetRoomCountList();
            return Ok(reseult);
        }
    }
}
